package ac.github.os.internal.core.condition.impl.player

import ac.github.os.internal.core.condition.Condition
import ac.github.os.internal.core.condition.call
import ac.github.os.internal.core.config.StringConfig
import ac.github.os.internal.core.trigger.PlayerTrigger
import ac.github.os.internal.session.Session
import taboolib.common.platform.Awake

@Awake
class FlyingCondition : Condition {

    override fun doScreen(session: Session, config: StringConfig): Boolean {
        return session.call<PlayerTrigger> { it.player.isFlying }
    }

    override val namespace: String
        get() = "flying"
}